﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WebCinesItech
{
    public partial class frmConsulta : System.Web.UI.Page
    {
        localhost.Service oWs=new localhost.Service();

        
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet tblcines = new DataSet();
            if (Page.IsPostBack)
            {
            }
            else
            {

                tblcines = oWs.ListarCines();


                cboListaCine.DataSource = tblcines;
                cboListaCine.DataTextField = "Cine";
                cboListaCine.DataValueField = "Codigo";
                cboListaCine.DataBind();
            }
            

        }

        protected void btnConsulta_Click(object sender, EventArgs e)
        {
            DataSet tbldatos =new DataSet();

            tbldatos =oWs.ListarCartelera(cboListaCine.SelectedValue.ToString());
        


        dgListado.DataSource = tbldatos.Tables[0];
        dgListado.DataBind();
        }

     
    }
}